$(function () {
    $.ajax({
        url: "/FindAllAddNewsServlet",// 自己完成后台
        type: 'post',
        data: {
            "searchStaffName": "",
            "searchCreatedTime":"",
            searchEndTime:"",
            searchTitle:"",
            pageSize:"5",
            pageNumber:"1",
        },
        dataType: 'json',
        success: function (result) {
            console.log(result.data.list[0])
            var res = result.data.list;
            for (var i = 0;i<res.length;i++){
                var tr = $("<tr></tr>");
                var td = $("<td>" + res[i].title + "</td>");
                var td1 = $("<td>" + res[i].createdTime + "</td>");
                tr.append(td);
                tr.append(td1);

                $("#table").append(tr);
            }

        }
    })

})

